/**
 * 
 */

package com.chengyu.eyc.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.chengyu.eyc.model.EycAdInfo;
import com.chengyu.eyc.model.EycCouponRule;
import com.chengyu.eyc.model.EycDataConfig;
import com.chengyu.eyc.model.EycInspPriceRule;
import com.chengyu.eyc.model.EycInspRule;
import com.chengyu.eyc.model.EycInspStation;
import com.chengyu.eyc.model.EycInspStationWorkday;
import com.chengyu.eyc.model.EycLog;
import com.chengyu.eyc.model.EycOtherShop;
import com.chengyu.eyc.model.EycParmPickupCar;
import com.chengyu.eyc.model.EycPublicInfo;
import com.chengyu.eyc.model.EycUserCoupon;
import com.chengyu.eyc.model.EycVehicleAv;
import com.chengyu.eyc.model.EycVehicleAvAddr;
import com.chengyu.eyc.model.EycVehicleMaintQa;
import com.chengyu.eyc.model.EycVerPerson;
import com.github.pagehelper.PageInfo;

import tk.mybatis.mapper.common.ConditionMapper;

/**
 * @author kevin
 *
 */
public interface EycBaseService {

    /**
     * @param eycInspStation
     * @return
     */
    EycInspStation deleteInspStation(EycInspStation eycInspStation);

    /**
     * @param <E>
     * @param tableClazz
     * @return
     */
    <E> ConditionMapper<E> getTableMapper(Class<E> tableClazz);

    String getUserId();

    int insertEycUserCoupon(EycUserCoupon eycCoupon);

    /**
     * @param eycLog
     * @return
     */
    EycLog insertEycLog(EycLog eycLog);

    /**
     * @param eycPublicInfo
     */
    EycPublicInfo insertEycPublicInfo(EycPublicInfo eycPublicInfo);

    /**
     * @param eycVehicleAv
     * @return
     */
    EycVehicleAv insertEycVehicleAv(EycVehicleAv eycVehicleAv);

    /**
     * @param eycInspStation
     * @return
     */
    EycInspStation insertOrUpdateInspStation(EycInspStation eycInspStation);

    /**
     * @param eycVehicleAvAddr
     * @return
     */
    EycVehicleAvAddr insertOrUpdateVehicleAvAddr(EycVehicleAvAddr eycVehicleAvAddr);

    /**
     * @return
     */
    boolean isLogin();

    /**
     * @param type
     * @param name
     * @return
     */
    EycDataConfig searchConfigByTypeAndNme(String type, String name);

    /**
     * 按类型查询数据配置项
     * 
     * @param typeCde
     * @return
     */
    List<EycDataConfig> searchConfigByTypeCde(String typeCde);

    /**
     * @param typeCdes
     * @return
     */
    Map<String, List<EycDataConfig>> searchConfigByTypeCdes(List<String> typeCdes);

    /**
     * @param userId
     * @return
     */
    Integer searchCountCouponByUserId(String userId);

    /**
     * 根据类型分页查询用户拥有的优惠券
     * @param params
     * @return
     */
    PageInfo<Map<String, Object>> searchCouponByUserIdAndType(Map<String, Object> params);

    /**
     * @param params
     * @return
     */
    PageInfo<EycDataConfig> searchDataConfigs(Map<String, Object> params);

    /**
     * @param plateNum
     * @return
     */
    EycVehicleAv searchEycVehicleAvByPlateNum(String plateNum);

    /**
     * @return
     */
    List<EycVehicleMaintQa> searchEycVehicleMaintQa();

    /**
     * @param params
     * @return
     */
    PageInfo<EycInspStation> searchInspStations(Map<String, Object> params);

    /**
     * 查询车联年检的价格
     * 
     * @param params
     * @return
     */
    EycInspPriceRule searchMatchInspPriceRule(Map<String, String> params);

    /**
     * 查询年检规则
     * 
     * @return
     */
    EycInspRule searchMatchInspRule(Map<String, String> params);

    /**
     * @param userId
     * @return
     */
    EycUserCoupon searchOneCouponByUserId(String userId);

    /**
     * @param pageCde
     * @param typeCde
     * @return
     */
    List<EycPublicInfo> searchPageConfigByTypeCde(String pageCde, String typeCde,String status);

    /**
     * @param publicInfoId
     * @return
     */
    EycPublicInfo searchPublishInfoById(String publicInfoId);

    /**
     * @param @Override typeCdes
     * @return
     */
    List<EycPublicInfo> searchPublishInfoByTypeCdes(List<String> typeCdes);

    /**
     * @param typeCdes
     * @param status
     * @return
     */
    List<EycPublicInfo> searchPublishInfoByTypeCdes(String pageCde,List<String> typeCdes, String status);

    /**
     * @param typeCde
     * @return
     */
    List<EycPublicInfo> searchPublishInfoPageByTypeCde(String typeCde);

    /**
     * @param id
     * @return
     */
    BigDecimal sumVehicleAvAmount(String id);

    /**
     * 设置优惠券使用状态
     * @param couponId
     * @return
     */
    EycUserCoupon updateCouponIsUsed(String couponId,Boolean isUsed);

    /**
     * @param eycPublicInfo
     * @return
     */
    EycPublicInfo updatehPublishInfoStatus(EycPublicInfo eycPublicInfo);

    /**
     * @param startDate
     * @param endDate
     * @return
     */
    List<EycInspStationWorkday> searchInspStationWorkdays(String startDate, String endDate);

    /**
     * @param params
     * @return
     */
    List<EycInspStation> searchEycInspectionStations(Map<String, Object> params);

    /**
     * @param inspStationId
     * @return
     */
    EycInspStation searchEycInspStationById(String inspStationId);

    /**
     * @param params
     * @return
     */
    Integer sumCouponAmountByUserIdAndType(Map<String, Object> params);

    /**
     * @param poiId
     * @return
     */
    EycOtherShop searchEycOtherShopById(String poiId);

    /**
     * @param typeCde
     * @return
     */
    List<Map<String,Object>> searchEycCouponRuleByTypeCde(Map<String, Object> params);

    /**
     * @param eycCouponRule
     * @param id
     */
    EycUserCoupon receiveCoupon(EycCouponRule eycCouponRule, String id);

    /**
     * @param eycCouponRules
     * @param id
     * @return
     */
    Boolean receiveCoupons(List<EycCouponRule> eycCouponRules, String id);

    /**
     * @param typeCde
     * @return
     */
    List<EycCouponRule> searchVehicleTypeCategoryItemByTypeCde(String typeCde);
    
    List<EycCouponRule> searchSubTypeCategoryItemByTypeCde(String typeCde);

    /**
     * @return
     */
    List<EycAdInfo> searchCarouselPictures();

    /**
     * @return
     */
    EycParmPickupCar searchNumberOfCarPickupDaily();

    /**
     * @param id
     * @return
     */
   List<EycVerPerson> hasVerificationAuthority(String id);
    
    
}